{ config, lib, pkgs, ... }:

{
  virtualisation = {
    #waydroid.enable = true;
    lxd.enable = true;
    # libvirtd = {
    #   enable = true;
    #   qemu = {
    #     package = pkgs.qemu_kvm;
    #     # Enable UEFI
    #     ovmf = {
    #       enable = true;
    #       packages = [ pkgs.OVMFFull.fd ];
    #     };
    #     # Enable virtual TPM support
    #     swtpm.enable = true;
    #   };
    # };
    virtualbox = {
      host = {
           enable = true;
           enableExtensionPack = true;
           };
      guest.enable = true;
      guest.x11 = true;
    };
  };
  environment.systemPackages = [
    # 与boot/boot.nix中内核保持一致
    pkgs.linuxKernel.packages.linux_xanmod.virtualbox
  ];
}
